﻿using System;
using System.Web.UI;
using EmptyWallGallery.Core.BLL;

namespace EmptyWallGallery.FrontEnd.inside.Editor.Gallery
{
    public partial class DeletePhoto : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["Id"] == null) return;
            if (!Core.Utilities.Common.Instance.IsNumeric(Request.QueryString["Id"])) return;

            Images.Instance.DeletePhoto(Convert.ToInt32(Request.QueryString["Id"]));

            Response.Redirect(Request.QueryString["ReUrl"] ?? "Album.aspx");
        }
    }
}